package com.lostad.app.vert.api.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.lostad.app.vert.api.dao.ProductDao;
import com.lostad.app.vert.api.entity.Product;

/**
 * Simple Spring service bean to expose the results of a trivial database call
 */
@Service
public class ProductService {

	@Autowired
	private ProductDao baseDao;

	public List<Product> getAllProducts() {
		return baseDao.findAll();
	}

	public void save(Product p) {
		baseDao.save(p);
	}

}
